package com.ichir.projects.uiflow.internal.api;

import com.ichir.projects.uiflow.definition.IFlowDefinition;
import com.ichir.projects.uiflow.definition.IFlowPart;
import com.ichir.projects.uiflow.ui.api.IUiPart;


/**
 * Flow resolver.
 * 
 * @author mahieddine
 */
public interface IFlowResolver {

	/**
	 * Retrieve a flow part from a UI part.
	 * @param uiPart
	 * @return flow part
	 */
	IFlowPart resolveFlowPart(IFlowDefinition flowDefinition, IUiPart uiPart);

	/**
	 * 
	 * @param flowDefinition
	 * @param flowPartId
	 * @param flowType
	 * @return
	 */
	IFlowPart getFlowPartById(IFlowDefinition flowDefinition, String flowPartId);
}